package com.cdgeekcamp.redas.wechat.entity;

import com.cdgeekcamp.redas.wechat.service.MsgHandlerService;

/**
 * 链接消息
 */
public class LinkMessageEntity extends MessageBaseEntity {
    // 消息标题
    private String Title;
    // 消息描述
    private String Description;
    // 消息链接
    private String Url;
    // 消息id，64位整型
    private Long MsgId;

    public LinkMessageEntity() {
    }

    public LinkMessageEntity(String fromUserName, String toUserName, Long createTime, String msgType) {
        super(fromUserName, toUserName, createTime, msgType);
    }

    public LinkMessageEntity(String title, String description, String url, Long msgId) {
        Title = title;
        Description = description;
        Url = url;
        MsgId = msgId;
    }

    public LinkMessageEntity(String fromUserName, String toUserName, Long createTime, String msgType, String title, String description, String url, Long msgId) {
        super(fromUserName, toUserName, createTime, msgType);
        Title = title;
        Description = description;
        Url = url;
        MsgId = msgId;
    }

    public String getTitle() {
        return Title;
    }

    public void setTitle(String title) {
        Title = title;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String description) {
        Description = description;
    }

    public String getUrl() {
        return Url;
    }

    public void setUrl(String url) {
        Url = url;
    }

    public Long getMsgId() {
        return MsgId;
    }

    public void setMsgId(Long msgId) {
        MsgId = msgId;
    }

    @Override
    public String doReply() {
        return new MsgHandlerService().linkHandler(this);
    }
}
